<?php $this->load->view('common/pagehead')?>
<?php $this->load->view('common/header')?>
<div id="content" class="pgwrapper1" style="background:#fff">
<div>
<div class="spec_15"></div>
<?php $this->load->view('common/browseByAlphabet');?>
<div class="spec_15"></div>
<div class="left w655 mr15">
<div class="spec_10"></div>
<div class="bx_shw w100">
<div class="bg1 p10_15">
<div class="left" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="<?php echo $couponDetail[0]['coupon_name']; ?>"><h1><?php echo $couponDetail[0]['coupon_name']; ?></h1>
</div>
<div class="left" style="margin-left:10px">
<div id="fb-root"></div><div class="fb-like mr10" data-href="http://www.facebook.com/couponskart25" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" style="display:inline"></div>
</div>
</div>
<?php if(!empty($couponDetail)){ 
                if($couponDetail[0]['coupon_affilateurl']!=''){ $affUrl=$couponDetail[0]['coupon_affilateurl']; }else{ $affUrl=$couponDetail[0]['store_affilateurl']; } ?>
<div class="p15">
<?php if(isset($couponDetail[0]['coupon_banner']) && $couponDetail[0]['coupon_banner']!=''){?>
<div><a href="/waitingpage/<?php echo $couponDetail[0]['coupon_id']; ?>/<?php echo $couponDetail[0]['store_id']; ?>" target="_blank" rel="nofollow"><img src="<?php echo $couponDetail[0]['coupon_banner'];?>" alt="<?php echo $couponDetail[0]['coupon_name'];?>" width="625" height="250" border="0" /></a></div>
<div class="spec_10"></div>
<?php }?>
<div>
<?php if($couponDetail[0]['coupon_expiredate']<date('Y-m-d')){?>
<div class="left w110" style="background-image:url('<?php echo $couponDetail[0]['store_image']; ?>');background-repeat:no-repeat"><a href="/waitingpage/<?php echo $couponDetail[0]['coupon_id']; ?>/<?php echo $couponDetail[0]['store_id']; ?>" target="_blank" rel="nofollow"><img src="/public/images/expired.png" alt="" class="bdr_logo logo_shadow" /></a><br /><br />
</div>
<?php }else{?>
<?php }?>
<?php if($couponDetail[0]['coupon_type']!="Offer"){ 
			if($couponDetail[0]['coupon_expiredate']>date('Y-m-d')){ ?>
<div class="left w110"><a href="/waitingpage/<?php echo $couponDetail[0]['coupon_id']; ?>/<?php echo $couponDetail[0]['store_id']; ?>" target="_blank" rel="nofollow"><img src="<?php echo $couponDetail[0]['store_image']; ?>" alt="" class="bdr_logo logo_shadow" /></a><br />
</div>
<?php } ?>
<div class="ml120">
<div class="bg_code w441" style="position:relative;margin-left:20px">
<div class="left"><input type="button" value="Click to Reveal" onclick="showCouponCode('getCode<?php echo $couponDetail[0]['coupon_id']; ?>','<?php echo $couponDetail[0]['coupon_code']; ?>','<?php echo $couponDetail[0]['store_id']; ?>')" class="get_code" /></div>
<div class="bg_arrow"></div>
<div class="left" id="getCode<?php echo $couponDetail[0]['coupon_id']; ?>"><input type="button" onclick="showCouponCode('getCode<?php echo $couponDetail[0]['coupon_id']; ?>','<?php echo $couponDetail[0]['coupon_code']; ?>','<?php echo $couponDetail[0]['store_id']; ?>')" value="" class="get_code1" /></div>
</div>
<div class="spec_10"></div>
<div class="left" style="margin-left:50px"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Added on: <?php echo date("jS F", strtotime($couponDetail[0]['coupon_startdate'])); ?></div>
<div class="left" style="margin-left:100px"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Expires on: <?php echo date("jS F", strtotime($couponDetail[0]['coupon_expiredate'])); ?></div>
<div class="clr"></div>
</div>
<?php } ?>
</div>
<div class="spec_10"></div>
<div>
<div class="spec_10"></div>
<div align="justify"><strong><?php echo $couponDetail[0]['coupon_description']; ?></strong></div>
<p style="font-size:14px;margin:10px 0;font-weight:bold;padding:0">About Offer</p>
<div><?php echo $couponDetail[0]['coupon_description2']; ?></div>
<div class="spec_10"></div>
<div><?php echo $couponDetail[0]['coupon_termsandconditions']; ?></div>
<div class="spec_10"></div>
</div>
</div>
<?php } ?>
<div class="spec_2"></div>
</div>
<div class="spec_15"></div>
<?php if(!empty($storeSimilarCoupon)){?>
<div class="bx_shw w100">
<div class="bg1 p10_15 txt1">
<div class="left"><h2><span class="txt_pnk">Other</span> <?php echo $couponDetail[0]['store_name']; ?> <span class="txt_pnk">Coupons</span></h2></div>
<div class="right">
<div class="g-plusone" data-annotation="inline" data-width="200"></div>
</div>
</div>
<div class="p15">
<?php if(!empty($storeSimilarCoupon)){ foreach($storeSimilarCoupon as $temp){ ?>
<div>
<div class="left"><img src="/public/images/arrow-small.jpg" width="35" /></div>
<div style="margin-top:5px"><a href="
                    /<?php if($temp['coupon_url']){ echo 'top-coupons'.'/'.$temp['store_url'].'/'.$temp['coupon_url'];}else{ echo $temp['store_url'].'-coupons';} ?>" style="text-decoration:none;margin-left:10px"><span class="txt_cpn"><?php echo $temp['coupon_name']; ?></span></a></div>
<div class="spec_10"></div>
</div>
<div class="spec_10"></div>
<?php }} ?>
<div class="right"><a href="/<?php echo $storeSimilarCoupon[0]['store_url']?>-coupons" class="rel_offers">More <?php echo $storeSimilarCoupon[0]['store_name']?> Coupon Codes &raquo; &raquo;</a></div>
</div>
<div class="spec_2"></div>
</div>
<?php }else{?>
<div class="bx_shw w100">
<div class="bg1 p10_15 txt1">
<div class="left"><h2><span class="txt_pnk">Similar</span> Coupons</h2></div>
<div class="right">
<div class="g-plusone" data-annotation="inline" data-width="200"></div>
</div>
</div>
<?php if(!empty($topCouponsArray)){ foreach($topCouponsArray as $temp){ ?>
<div class="p15 bdr_b">
<div class="left w110"><a href="/<?php echo $temp['store_url']; ?>-coupons"><img src="<?php echo $temp['store_image']; ?>" alt="" class="bdr_logo logo_shadow" /></a><br /><br />
<?php if($temp['coupon_bank']!=0){ ?>
<span class="plus">+</span><br />
<img src="/public/images/logo_<?php echo $temp['coupon_bank']; ?>.png" alt="" hspace="16" vspace="11" />
<?php }else if($temp['coupon_type']=='FeaturedCpn'){ ?>
<br />
<img src="/public/images/verified.png" alt="Featured Coupon" hspace="0" />
<?php } ?>
</div>
<div class="ml120"><span class="txt_cpn"><?php echo $temp['coupon_name']; ?></span>
<div class="spec_10"></div>
<div class="bg_code w441" style="position:relative">
<div class="left"><input type="button" value="Click to Reveal" onclick="showCouponCode('getCode<?php echo $temp['coupon_id']; ?>','<?php echo $temp['coupon_code']; ?>','<?php echo $temp['store_id']; ?>')" class="get_code" /></div>
<div class="bg_arrow"></div>
<div class="left" id="getCode<?php echo $temp['coupon_id']; ?>"><input type="button" onclick="showCouponCode('getCode<?php echo $temp['coupon_id']; ?>','<?php echo $temp['coupon_code']; ?>','<?php echo $temp['store_id']; ?>')" value="" class="get_code1" /></div>
</div>
<div class="spec_10"></div>
<div><?php echo $temp['coupon_description']; ?></div>
<div class="spec_10"></div>
<div class="left"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Added on: <?php echo date("jS F", strtotime($temp['coupon_startdate'])); ?></div>
<div class="left"><img src="/public/images/cal_icon.png" alt="" /></div>
<div class="left mlr10_20 txt3">Expires on: <?php echo date("jS F", strtotime($temp['coupon_expiredate'])); ?></div>
</div>
</div>
<?php }} ?>
<div class="spec_2"></div>
</div>
<?php }?>
<div class="spec_15"></div>
</div>
<div class="left w320">
<div class="p10 bdr_logo">
<a href="<?php echo $bannersArray[0]['banner_link']; ?>" target="_blank" rel="nofollow"><img src="<?php echo $bannersArray[0]['banner_image']; ?>" height="250" width="300" alt="<?php echo $bannersArray[0]['banner_alt']; ?>" /></a>
</div>
<div class="spec_15"></div>
<div id="ratingWidget">
<?php $this->load->view('common/starRatings'); ?>
</div>
<div class="spec_15"></div>
<?php $this->load->view('common/fb_widget'); ?>
<div class="spec_15"></div>
<?php $this->load->view('common/categoryPanel'); ?>
<div class="spec_15"></div>
</div>
<div class="spec_15"></div>
<?php $this->load->view('common/search'); ?>
<div class="spec_15"></div>
<?php $this->load->view('common/banners'); ?>
<div class="spec_15"></div>
</div>
</div>
<?php $this->load->view('common/footer')?>
<script>!function(e,a,f){var c,b=e.getElementsByTagName(a)[0];if(!e.getElementById(f)){c=e.createElement(a);c.id=f;c.src="//platform.twitter.com/widgets.js";b.parentNode.insertBefore(c,b)}}(document,"script","twitter-wjs");</script>
<script type="text/javascript">(function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="https://apis.google.com/js/plusone.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})();</script>